﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RoleFunction.aspx.cs" Inherits="MedicareNoteManagerWeb.Web.RoleFunction" %>
<%@ Register assembly="Comm" namespace="Comm" tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
     <script src="../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script> 
         <link href="../Css/TableStyle.css" rel="stylesheet" type="text/css" />
       <link href="../lib/ligerUI/skins/Gray/css/all.css" rel="stylesheet" />
      <link href="../lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
        <link href="../../lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
           <script src="../../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
    <script src="../../lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script> 
    <script src="../../lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
     <script language="javascript" type="text/javascript">
         var win1;
         function f_open() {
             if (win1) win1.show();
             else win1 = $.ligerDialog.open({ height: 400, url: 'RoleFunction_add.aspx', width: 600, showMax: true, showToggle: true, showMin: true, isResize: true, slide: false });
         }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <center>
    <div style="width:96%; margin-top:3%;">
        <table style="width:100%">
        <tr>
            <td align="left" colspan="3">
                <asp:Label ID="Label1" runat="server" Text="用户权限控制" Font-Bold="True" 
                    Font-Size="XX-Large" ForeColor="Gray"></asp:Label>
            </td>
        </tr>
            <tr>
                <td align="right">
                    <asp:DropDownList ID="DropUser" runat="server">
                    </asp:DropDownList>
                </td>
                <td align="right" style="width:60px;">
                  <asp:Button ID="btnFind" runat="server" class="l-button" Text="查询" 
                      onclick="btnFind_Click" />
                </td>
                <td align="right" style="width:60px;">
                    <input type="button" size="120" onclick="f_open()" class="l-button" 
                        value="添加" />
                </td>
            </tr>
            <tr>
                <td colspan="3" style="padding-top:1%">
     <asp:GridView ID="Grd_User" runat="server" CssClass="l-grid" AutoGenerateColumns="False" 
                        OnRowDeleting="Grd_User_RowDeleting" DataKeyNames="RightID" 
                        OnRowCancelingEdit="Grd_User_RowCancelingEdit" 
                        OnRowEditing="Grd_User_RowEditing"  OnRowDataBound="Grd_User_RowDataBound" 
                        OnRowUpdating="Grd_User_RowUpdating" AllowSorting="True" 
                        OnPageIndexChanging="Grd_User_PageIndexChanging" AllowPaging="True" 
                        BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                        CellPadding="3" Width="100%" >
         <EmptyDataTemplate>
                <div style="background-color: #FFFFD6; color: #ff0000; text-align: center; font-size: 18px">
                    暂时没有数据!
                </div>
            </EmptyDataTemplate>
          <AlternatingRowStyle CssClass="l-grid-row" />
          <Columns> 
                  <asp:TemplateField HeaderText="用户角色" >
                        <ControlStyle  CssClass="l-grid-row" />
                        <ItemStyle Width="30%" />
                    <ItemTemplate>
                       <asp:Label runat="server" ID="lbRole" Text='<%# Eval("RoleName") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:DropDownList ID="ddlRole" runat="server">
                        </asp:DropDownList>
                             </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="功能模块" >
                        <ControlStyle  CssClass="l-grid-row" />
                        <ItemStyle Width="35%" />
                    <ItemTemplate>
                       <asp:Label runat="server" ID="lbMoudel" Text='<%# Eval("MenuName") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:DropDownList ID="ddlMoudel" runat="server">
                        </asp:DropDownList>
                             </EditItemTemplate>
                    </asp:TemplateField>
               <asp:CommandField ShowEditButton="True" >
                 
                  <ItemStyle Width="10%" HorizontalAlign="Center" ForeColor="#0000D8" />
                  </asp:CommandField>
                 
            <asp:CommandField ShowDeleteButton="True">
                <ItemStyle Width="10%" HorizontalAlign="Center" ForeColor="#0000D8" />
            </asp:CommandField> 
        </Columns>
         <FooterStyle BackColor="White" ForeColor="#000066" />
         <HeaderStyle CssClass="l-grid-row" BackColor="#006699" Font-Bold="True" 
             ForeColor="White" />
         <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="right" />
         <PagerTemplate>
                当前第:
                <asp:Label ID="LabelCurrentPage" runat="server" Text="<%# ((GridView)Container.NamingContainer).PageIndex + 1 %>"></asp:Label>
                页/共:
                <asp:Label ID="LabelPageCount" runat="server" Text="<%# ((GridView)Container.NamingContainer).PageCount %>"></asp:Label>
                页
                <asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page"
                    Visible='<%#((GridView)Container.NamingContainer).PageIndex != 0 %>'>首页</asp:LinkButton>
                <asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev"
                    CommandName="Page" Visible='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'>上一页</asp:LinkButton>
                <asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page"
                    Visible='<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>'>下一页</asp:LinkButton>
                <asp:LinkButton ID="LinkButtonLastPage" runat="server" CommandArgument="Last" CommandName="Page"
                    Visible='<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>'>尾页</asp:LinkButton>
                转到第
                <asp:TextBox ID="txtNewPageIndex" runat="server" Width="20px" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>' />页
                <asp:LinkButton ID="btnGo" runat="server" CausesValidation="False" CommandArgument="-2"
                    CommandName="Page" Text="GO" />
            </PagerTemplate>
         <RowStyle CssClass="l-grid-row" ForeColor="#000066" />
         <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
         <SortedAscendingCellStyle BackColor="#F1F1F1" />
         <SortedAscendingHeaderStyle BackColor="#007DBB" />
         <SortedDescendingCellStyle BackColor="#CAC9C9" />
         <SortedDescendingHeaderStyle BackColor="#00547E" />
        </asp:GridView>
                </td>
            </tr>
        </table>
        </div>
    </center>
    </div>
    </form>
</body>
</html>
